﻿using System;
using System.Collections.Generic;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JHT.EFMigrationTest.ClassLibrary1.Migrations
{
    public class ViewCreate : DbMigration
    {
        public override void Up()
        {
            Sql(@"create view V_MyEntity as select id,name,substring(name,1,1) first_name from MyEntities");
        }


        public override void Down()
        {
            Sql("drop view V_MyEntity");
        }
    }
}
